﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MVCTippSpielManagement.Management.Interfaces;

namespace MVCTippSpielManagement.Management
{
	public class Controller : IViewAdapter, IModelAdapter
	{
		private IView _View;
		private IModel _Model;

		public Controller(IView v, IModel m)
		{
			_View = v;
			_Model = m;

			_View.SetController(this);
			_Model.SetController(this);
		}

		#region IViewAdapter Member

		public object ModelFactory(string key)
		{
			return _Model.ModelFactory(key);
		}

		#endregion

		#region IModelAdapter Member

		public void ViewFactory()
		{
			_View.ViewFactory();
		}

		#endregion
	}
}
